package com.tianji.learning.controller;


import com.tianji.api.dto.leanring.LearningLessonDTO;
import com.tianji.learning.domain.dto.LearningRecordFormDTO;
import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ILearningRecordService;
import com.tianji.learning.service.SignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 学习记录表 前端控制器
 * </p>
 *
 * @author wxh
 * @since 2024-08-22
 */
@Api(tags = "签到相关接口")
@RestController
@RequestMapping("/sign-records")
@RequiredArgsConstructor
public class SignRecordController {
    private final SignRecordService signRecordService;


    /**
     * 签到
     *
     * @return
     */
    @ApiOperation("签到")
    @PostMapping
    public SignResultVO addSignRecord() {
        return signRecordService.addSignRecord();
    }

    /**
     * 查询签到天数
     *
     * @return
     */
    @ApiOperation("查询签到天数")
    @GetMapping
    public Byte[] querySignDayCount() {
        return signRecordService.querySignDayCount();
    }


}
